--受击
---@class Battle.AiEnterHitAction:Battle.AiLeaf
---@field New fun():Battle.AiEnterHitAction
local AiEnterHitAction = Battle.CreateClass("AiEnterHitAction",Battle.AiLeaf)
Battle.AiEnterHitAction = AiEnterHitAction
local t = AiEnterHitAction
function t:onInitialize()
    self.during = self:GetActor().hitDuringTime
    self:GetActor().actionStateSystem:EnterState(Battle.ActionState.Hit)
end
function t:update(dt)
    self.during = self.during - dt
    if self.during <= 0 then
        return Battle.AiTreeStatus.SUCCESS
    end
    return Battle.AiTreeStatus.RUNNING
end
function t:onTerminate()
    self:GetBlackboard():Set("hit",false)
end